const mongoose = require('mongoose')


mongoose.connect('mongodb://127.0.0.1/project')

mongoose.connection.on('connected', function () {
    console.log('成功');
})

mongoose.connection.on('error', function () {
    console.log('错误');
})

mongoose.connection.on('disconnected', function () {
    console.log('断开连接');
})
module.exports = {
    mongoose
}